﻿<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="false" CodeFile="NguyenTuanAnh02.aspx.cs" Inherits="NguyenTuanAnh02" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False">
        <Columns>
        <asp:TemplateField HeaderText="Mã loại hàng">
        <ItemTemplate>
            <%#Eval("ID_LOAI_HANG") %>
        </ItemTemplate>
        </asp:TemplateField>

        <asp:TemplateField HeaderText="Tên loại hàng">
        <ItemTemplate>
            <%#Eval("TEN_LOAI_HANG") %>
        </ItemTemplate>
        </asp:TemplateField>

        <asp:TemplateField HeaderText="Hình đại diện">
        <ItemTemplate>
               <asp:Image ID="img" runat="server" src='<%#Eval("HINH_DAI_DIEN") %>' />
        </ItemTemplate>
        </asp:TemplateField>

        <asp:TemplateField HeaderText="Xem">
        <ItemTemplate>
            <asp:LinkButton id="lbtn" runat="server" Text="Xem hàng" 
            CommandName='<%#Eval("ID_LOAI_HANG") %>' onclick="lbtn_Click"></asp:LinkButton>
        </ItemTemplate>
        </asp:TemplateField>
        </Columns>
        </asp:GridView>
    
    </div>
    </form>
</body>
</html>
